package com.xinshujia.wxxcx.service.impl;

import cn.dev33.satoken.stp.StpUtil;
import com.xinshujia.wxxcx.mapper.ProductionLineMapper;
import com.xinshujia.wxxcx.pojos.entity.ProductionLine;
import com.xinshujia.wxxcx.pojos.info.WxUserInfo;
import com.xinshujia.wxxcx.service.ProductionLineService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author Cui Han
 * @Date 2024/5/17 13:52
 * @Description: TODO
 * @Version 1.0
 */
@Service
public class ProductionLineServiceImpl implements ProductionLineService {


    @Autowired
    private ProductionLineMapper productionLineMapper;


    /**
     * 查询产线
     *
     * @return
     */
    @Override
    public List<ProductionLine> findProductionLine() {
        WxUserInfo wxUserInfo = (WxUserInfo) StpUtil.getSession().get("wxUserInfo");
        String company = wxUserInfo.getCompany();
        return productionLineMapper.findProductionLine(company);
    }
}
